home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Main.bin
/
ShowSystemColors.java
< prev
next >
Wrap
Text File
|
1998-09-08
|
10KB
|
175 lines
package com.symantec.itools.tools.utilities;
import java.awt.SystemColor;
import java.awt.Color;
import com.symantec.itools.frameworks.application.commandline.Application;
/**
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public class ShowSystemColors
extends Application
{
/**
* @param argv TODO
* @since VCafe 3.0
*/
public static void main(String[] argv)
{
System.out.println("activeCaption " + colorToString(SystemColor.activeCaption.getRed(),
SystemColor.activeCaption.getGreen(),
SystemColor.activeCaption.getBlue()));
System.out.println("activeCaptionBorder " + colorToString(SystemColor.activeCaptionBorder.getRed(),
SystemColor.activeCaptionBorder.getGreen(),
SystemColor.activeCaptionBorder.getBlue()));
System.out.println("activeCaptionText " + colorToString(SystemColor.activeCaptionText.getRed(),
SystemColor.activeCaptionText.getGreen(),
SystemColor.activeCaptionText.getBlue()));
System.out.println("control " + colorToString(SystemColor.control.getRed() ,
SystemColor.control.getGreen(),
SystemColor.control.getBlue()));
System.out.println("controlDkShadow " + colorToString(SystemColor.controlDkShadow.getRed(),
SystemColor.controlDkShadow.getGreen(),
SystemColor.controlDkShadow.getBlue()));
System.out.println("controlHighlight " + colorToString(SystemColor.controlHighlight.getRed(),
SystemColor.controlHighlight.getGreen(),
SystemColor.controlHighlight.getBlue()));
System.out.println("controlLtHighlight " + colorToString(SystemColor.controlLtHighlight.getRed(),
SystemColor.controlLtHighlight.getGreen(),
SystemColor.controlLtHighlight.getBlue()));
System.out.println("controlShadow " + colorToString(SystemColor.controlShadow.getRed(),
SystemColor.controlShadow.getGreen(),
SystemColor.controlShadow.getBlue()));
System.out.println("controlText " + colorToString(SystemColor.controlText.getRed(),
SystemColor.controlText.getGreen(),
SystemColor.controlText.getBlue()));
System.out.println("desktop " + colorToString(SystemColor.desktop.getRed(),
SystemColor.desktop.getGreen(),
SystemColor.desktop.getBlue()));
System.out.println("inactiveCaption " + colorToString(SystemColor.inactiveCaption.getRed(),
SystemColor.inactiveCaption.getGreen(),
SystemColor.inactiveCaption.getBlue()));
System.out.println("inactiveCaptionBorder " + colorToString(SystemColor.inactiveCaptionBorder.getRed(),
SystemColor.inactiveCaptionBorder.getGreen(),
SystemColor.inactiveCaptionBorder.getBlue()));
System.out.println("inactiveCaptionText " + colorToString(SystemColor.inactiveCaptionText.getRed(),
SystemColor.inactiveCaptionText.getGreen(),
SystemColor.inactiveCaptionText.getBlue()));
System.out.println("info " + colorToString(SystemColor.info.getRed(),
SystemColor.info.getGreen(),
SystemColor.info.getBlue()));
System.out.println("infoText " + colorToString(SystemColor.infoText.getRed(),
SystemColor.infoText.getGreen(),
SystemColor.infoText.getBlue()));
System.out.println("menu " + colorToString(SystemColor.menu.getRed(),
SystemColor.menu.getGreen(),
SystemColor.menu.getBlue()));
System.out.println("menuText " + colorToString(SystemColor.menuText.getRed(),
SystemColor.menuText.getGreen(),
SystemColor.menuText.getBlue()));
System.out.println("scrollbar " + colorToString(SystemColor.scrollbar.getRed(),
SystemColor.scrollbar.getGreen(),
SystemColor.scrollbar.getBlue()));
System.out.println("text " + colorToString(SystemColor.text.getRed(),
SystemColor.text.getGreen(),
SystemColor.text.getBlue()));
System.out.println("textHighlight " + colorToString(SystemColor.textHighlight.getRed(),
SystemColor.textHighlight.getGreen(),
SystemColor.textHighlight.getBlue()));
System.out.println("textHighlightText " + colorToString(SystemColor.textHighlightText.getRed(),
SystemColor.textHighlightText.getGreen(),
SystemColor.textHighlightText.getBlue()));
System.out.println("textInactiveText " + colorToString(SystemColor.textInactiveText.getRed(),
SystemColor.textInactiveText.getGreen(),
SystemColor.textInactiveText.getBlue()));
System.out.println("textText " + colorToString(SystemColor.textText.getRed(),
SystemColor.textText.getGreen(),
SystemColor.textText.getBlue()));
System.out.println("window " + colorToString(SystemColor.window.getRed(),
SystemColor.window.getGreen(),
SystemColor.window.getBlue()));
System.out.println("windowBorder " + colorToString(SystemColor.windowBorder.getRed(),
SystemColor.windowBorder.getGreen() ,
SystemColor.windowBorder.getBlue()));
System.out.println("windowText " + colorToString(SystemColor.windowText.getRed(),
SystemColor.windowText.getGreen(),
SystemColor.windowText.getBlue()));
System.exit(0);
}
/**
* @param red TODO
* @param green TODO
* @param blue TODO
* @since VCafe 3.0
*/
static String colorToString(int red, int green, int blue)
{
Color color;
color = new Color(red, green, blue);
if(color.equals(Color.white))
{
return ("White");
}
else if(color.equals(Color.lightGray))
{
return ("Light Gray");
}
else if(color.equals(Color.gray))
{
return ("Gray");
}
else if(color.equals(Color.darkGray))
{
return ("Dark Gray");
}
else if(color.equals(Color.black))
{
return ("Black");
}
else if(color.equals(Color.red))
{
return ("Red");
}
else if(color.equals(Color.pink))
{
return ("Pink");
}
else if(color.equals(Color.orange))
{
return ("Orange");
}
else if(color.equals(Color.yellow))
{
return ("Yellow");
}
else if(color.equals(Color.green))
{
return ("Green");
}
else if(color.equals(Color.magenta))
{
return ("Magenta");
}
else if(color.equals(Color.cyan))
{
return ("Cyan");
}
else if(color.equals(Color.blue))
{
return ("Blue");
}
return (red + ", " + green + ", " + blue);
}
}